package com.jbm.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by 家帮忙 on 2016/11/15.
 */

public class MySqliOpenHe extends SQLiteOpenHelper {

    final static String OPEN_LIBR ="open_libr.db";
    final static String OPEN_LOG="log";
    public   MySqliOpenHe(Context context) {
        super(context, OPEN_LIBR, null,1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sqopen="create table "+OPEN_LOG+" (_id integer identity(1,1) primary key,login_id integer,eguard_id integer,egkey_id integer,last_count integer,open_date text,create_date text,is_open integer,try_cnt integer,phone_module text,open_type text,ord_date text,call_date text,error text)";
        db.execSQL(sqopen);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
//        String str="ALTER TABLE "+OPEN_LOG+" ADD error text";
//        db.execSQL(str);


            }
}
